/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package teacher;

/**
 *
 * @author Root
 */
public class WhaleClassifier {

    public void classify(Whale[] whales) {
        //TODO: implement this method
        for (int i = 0; i < whales.length; i++) {
            Whale whale = whales[i];
            if (whale.getWeight() < 200) {
                whale.setType("U");

            } else if (whale.getWeight() <= 200 && whale.getWeight() > 150) {
                whale.setType("E");
            } else if (whale.getWeight() <= 150 && whale.getWeight() > 100) {
                whale.setType("L");
            } else if (whale.getWeight() <= 100 && whale.getWeight() > 50) {
                whale.setType("A");
            } else if (whale.getWeight() <= 50 && whale.getWeight() > 0) {
                whale.setType("S");
            }
        }
    }
}
